<template>
  <div class="box">
    <button class="my-button" @click="addCount">result {{ count }}</button>
  </div>
</template>

<!-- 选项式api -->
<script>
export default {
  data() {
    return {
      count:0
    }
  },
  methods:{
    addCount() {
      this.count++
    }
  }
}
</script>

<style scoped>
.box {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
}

.my-button {
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  padding: 15px 32px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
}
</style>
